! function (a) {
	define(function (require, b, c) {
		function d() {
			var a = location.hostname;
			return /:/.test(a) ? /\[|\]/.test(a) ? a : "[" + a + "]" : a
		}
		var e = require("jsCore/rpcLogin");
		$flashvideo = a('<div id="flashvideo" style="background:rgb(0,0,0);position:absolute;top:-10000px;width:1px;height:1px"></div>'), $flashvideo.appendTo(document.body); {
			var f = null,
				g = 0,
				h = !1,
				i = 0;
			c.exports = {
				protocol: "rtmp:",
				ip: d(),
				preivewport: "1935",
				playbackport: "1935",
				init: function (a) {
					return 1 == g ? void(a && a()) : (f = this, f.playpreviewurl = f.protocol + "//" + f.ip + ":" + f.playbackport, f.playbackurl = f.protocol + "//" + f.ip + ":" + f.playbackport, a && a(), void(g = 1))
				},
				cover: function (b) {
					var c = a(b),
						d = c.offset(),
						e = c.width(),
						f = c.height();
					$flashvideo.css({
						width: e,
						height: f,
						top: d.top,
						left: d.left,
						"z-index": 10002
					}), "flash" == webApp.playMode ? $flashvideo.show() : $flashvideo.hide()
				},
				playPreview: function (b, c) {
					e.chkAuthority("Monitor_01") && ($flashvideo.empty(), $flashvideo.append('<object width="0" height="0" id="flashvideoplayer" name="FlashPlayer" type="application/x-shockwave-flash" data="swfs/StrobeMediaPlayback.swf" ><param name="wmode" value="transparent"><param name="bgcolor" value="#000000"><param name="allowscriptaccess" value="sameDomain"><param name="allowfullscreen" value="true"><param id="flashvar" name="flashvars" value=""></object>'), rpc.StreamUrlService.getUrls("RTMP", 0, {
						channel: b,
						subtype: c
					}).done(function (b) {
						$flashvideo.empty();
						var c = f.playpreviewurl + b.params.url[0] + "&amp;streamType=live&amp;autoPlay=true&amp;controlBarAutoHide=true";
						$flashvideo.append('<object width="100%" height="100%" id="flashvideoplayer" name="FlashPlayer" type="application/x-shockwave-flash" data="swfs/StrobeMediaPlayback.swf" ><param name="wmode" value="transparent"><param name="bgcolor" value="#000000"><param name="allowscriptaccess" value="sameDomain"><param name="allowfullscreen" value="true"><param id="flashvar" name="flashvars" value="src=' + c + '"></object>'), h || i || (i = window.setInterval(function () {
							var b = a("#flashvideoplayer")[0];
							b && b.Play && (h = !0, clearInterval(i))
						}, 1e3))
					}))
				},
				checkAvailable: function () {
					return h
				},
				playback: function (a) {
					rpc.StreamUrlService.getUrls("RTMP", 1, {
						filename: a
					}).done(function (a) {
						$flashvideo.empty();
						var b = f.playbackurl + a.params.url[0] + "&amp;streamType=vod&amp;autoPlay=true";
						$flashvideo.append('<object width="100%" height="100%" id="flashvideoplayer" name="FlashPlayer" type="application/x-shockwave-flash" data="swfs/StrobeMediaPlayback.swf" ><param name="wmode" value="transparent"><param name="bgcolor" value="#000000"><param name="allowscriptaccess" value="sameDomain"><param name="allowfullscreen" value="true"><param id="flashvar" name="flashvars" value="src=' + b + '"></object>')
					})
				},
				hide: function () {
					$flashvideo && $flashvideo.empty(), $flashvideo.css({
						top: -1e5
					})
				},
				visible: function (a) {
					$flashvideo && $flashvideo.css("visibility", a ? "visible" : "hidden")
				},
				destroy: function () {
					$flashvideo && $flashvideo.empty(), g = 0
				}
			}
		}
	})
}(jQuery);